<?php
$full_name=$_POST['full_name'];
$dob=$_POST['dob'];
$gender=$_POST['gender'];
$father_name=$_POST['father_name'];
$mother_name=$_POST['mother_name'];
$photo=$_POST['photo'];
$parent_number=$_POST['parent_number'];
$mobile_number=$_POST['mobile_number'];
$address=$_POST['address'];
$city=$_POST['city'];
$state=$_POST['state'];
$country=$_POST['country'];
$pin=$_POST['pin'];
$previous_course_name=$_POST['previous_course_name'];
$previous_school_name=$_POST['previous_school_name'];
$previous_board=$_POST['previous_board'];
$previous_specilization=$_POST['previous_specilization'];
$previous_percentage=$_POST['previous_percentage'];
$course_name=$_POST['course_name'];
$course_fee=$_POST['course_fee'];
$hostel_facility=$_POST['hostel_facility'];
$hostel_fee=$_POST['hostel_fee'];
$discount=$_POST['discount'];
$installment=$_POST['installment'];
$total=$_POST['total'];
$form_number=$_POST['form_number'];
$email=$_POST['email'];

 
include('connection.php');

$sql="INSERT INTO `student information`(full_name,gender,father_name,mother_name,dob,parent_number, mobile_number,address,city,state,country,pin,photo,course_name,course_fee,hostel_facility, hostel_fee,discount,installment,total,previous_course_name,previous_school_name,previous_board, previous_specilization,previous_percentage,form_number,email)VALUES('$full_name','$gender','$father_name','$mother_name','$dob','$parent_number','$mobile_number','$address','$city','$state','$country','$pin','$photo','$course_name','$course_fee','$hostel_facility','$hostel_fee','$discount','$installment','$total','$previous_course_name','$previous_school_name','$previous_board','$previous_specilization','$previous_percentage','$form_number','$email')";
$result=mysql_query($sql,$con);

if(!$result)
{
	echo "Student details are not submited successfully".$full_name;
	
}
else
{
	$sql= "SELECT `student_id` FROM `student information` WHERE `form_number`= '$form_number'";
	$res=mysql_query($sql,$con);
	$row=mysql_fetch_array($res);
	
	
	echo"<img src='studentprofileimage/".$photo."' style='height:100px; width:100px;'>";
	echo $full_name;
	echo" <div class='btn-group'>
   		 <input type='button' class='btn-default btn' value='Add Next Student Detail' />
   			<a href='payment.php?id=".$row['student_id']."'> <input type='button' class='btn-default btn' value='Make Payment' />
 	   		<a href='index.php' class='btn-default btn'>Go To Dashboard</a>
		</div>";
 

}



mysql_close($con);
?>